$(function(){
	changeMovie();
	$.ajax({
		type: "POST",
		url: " /kingticket/movie/movieDetail",
		data: {id: message.getMovieId()},
		dataType: "json",
		success: function (data) {
			upList.$data.items = data.data;
		},
		error:function(data){
			alert("error");
		}
	});
});
//获取某些信息
var message = {

	url: window.location.search,
	str: window.location.search.substr(1),

	//从URL中提取出movieId
	getMovieId: function(){
		var value = "",
			strs = this.str.split("&");
		value = unescape(strs[0].split("=")[1]);
		console.log('movieId:'+value);
		return value;
	}

};


// 切换影片
var changeMovie = function(){
	$('.movie-open').on('click',function(){
		$('.detail-wrap').addClass('detail-hauled');
		$('.movie-open').css('opacity','0');
		$('.detail-open').css('opacity','1');
	});
	$('.detail-open').on('click',function(){
		$('.detail-wrap').removeClass('detail-hauled');
		$('.movie-open').css('opacity','1');
		$('.detail-open').css('opacity','0');
	})
};
